package com.photoeditor.demo.model.image.emoji;

import android.content.Context;

import com.photoeditor.R;

import java.util.List;

/**
 * Created by Lai on 2019/7/8 0008.
 */
public class OnlineStickerResource extends StickerApkResource {

    private String[] mIconUrls;

    public OnlineStickerResource(Context context, String pkgName, List<String> iconUrls) {
        super(pkgName, context.getResources());
        mIconUrls = new String[iconUrls.size()];
        iconUrls.toArray(mIconUrls);
        doInit();
    }

    @Override
    public void doInit() {
        super.doInit();

        setEmojiColNum(mRes.getInteger(R.integer.emoji_col_num));
        setEmojiPageNum(mRes.getInteger(R.integer.emoji_page_num));
        setVerticalSpacing(mRes.getDimensionPixelSize(R.dimen.vertical_spacing));
        setHorizontalSpacing(mRes.getDimensionPixelSize(R.dimen.horizontal_spacing));
        setEmojiWidth(mRes.getDimensionPixelSize(R.dimen.emoji_width));
        setEmojiHeight(mRes.getDimensionPixelSize(R.dimen.emoji_Height));
        setItemWidth(mRes.getDimensionPixelSize(R.dimen.item_width));
        setItemHeight(mRes.getDimensionPixelSize(R.dimen.item_height));
        setPageHeight(mRes.getDimensionPixelSize(R.dimen.page_height));
        setEditEmojiWidth(mRes.getDimensionPixelSize(R.dimen.edit_emoji_width));
        setEditEmojiHeight(mRes.getDimensionPixelSize(R.dimen.edit_emoji_height));
        setBgColor(mRes.getColor(R.color.bg_color));

        setNeedBuy(false);

    }

    public String[] getIconUrls() {
        return mIconUrls;
    }

    public void setIconUrls(String[] iconUrls) {
        mIconUrls = iconUrls;
    }
}
